<style>
    .i_class {
        font-size: 18px;
        width: 28px;
        color: #0a1015;
    }
</style>
<section class="content-header">
    <h1>&nbsp;</h1>
    <ol class="breadcrumb pull-left" style="left:10px;">
        <li><a href="javascript:void(0);"><i class="fa fa-dashboard"></i>
            菜单管理</a></li>
        <li class="active"></li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-body" style="margin-top:1px;">
                    <div style="background-color: #f5f5f5;width: 30%;margin-left: 20%;margin-bottom: 3%;">
                        <treecontrol class="tree-boot"
                                     tree-model="treedata"
                                     options="treeOptions"
                                     selected-node="selectedNode"
                                     expanded-nodes="expandedNodes"
                                     on-selection="showSelected(node)">
                            {{node.menu_name}}
                            <dvi style="float: right;">
                                <i class="glyphicon glyphicon-cog i_class" ng-if="node.menu_id != 0"
                                   ng-click="edit(node,'edit');"/>
                                <i class="glyphicon glyphicon-trash i_class" ng-if="node.menu_id != 0"
                                   ng-click="del(node.menu_id);"/>
                                <i class="glyphicon glyphicon-plus i_class" ng-if="node.menu_level == 0 || node.menu_level == 1"
                                   ng-click="edit(node,'add');"/>
                                <i class="glyphicon glyphicon-plus i_class" ng-if="node.menu_level == 2" style="color: grey;"/>
                            </dvi>
                        </treecontrol>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<script type="text/ng-template" id="edit.html">
    <div class="modal-header">
        <!-- <h3 class="modal-title">异常信息<small><cite title="Source Title"></cite></small></h3> -->
    </div>
    <div class="container">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <div class="form-group">
                    <label>菜单名称:</label><input class="form-control-3" type="text"
                                              ng-model="menu_name"/>
                </div>
                <div class="form-group">
                    <label>菜单链接:</label><input class="form-control-3" type="text"
                                              ng-model="menu_url"/>
                </div>
                <div class="form-group">
                    <label>菜单样式:</label><input class="form-control-3" type="text"
                                               ng-model="menu_css"/>
                </div>
                <div class="checkbox" ng-show="statu_show">

                    <input type="radio" name="person-action" value="0" ng-model="menu_status"/>可用&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="person-action" value="1" ng-model="menu_status"/>不可用 <b style="color: red; padding-left: 10px;" ng-show="menu_status==1">不可用时，在左侧菜单栏不显示!</b>
                </div>


            </div>
        </div>
    </div>

    <div class="modal-footer">
        <button class="btn btn-primary" type="button" ng-click="save(menu_id)">保存</button>
        <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
    </div>
</script>